package action;

import java.util.List;
import java.util.Map;

import cn.dao.PictureDao;

import com.xiaoleilu.hutool.Log;


public class PictureController extends Controller{
	public void index(){
		Log.info("图片控制器");
	}
	
	public void get(){
		List pictures = (List) PictureDao.getPicture(null);
		for(Map m : (List<Map>)pictures){
			String src = (String)m.get("Src");
			m.put("Src", "http://127.0.0.1:9090"+src.substring(src.lastIndexOf("/")));
		}
		this.renderJson(pictures);
	}
}
